package com.snfdf.camunda.service;

import lombok.extern.slf4j.Slf4j;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;
import org.springframework.stereotype.Service;

/**
 * 测试异步延续
 * 默认情况下service task等抛出异常会回滚到上一步，比如说上一步是user task
 * 配置了异步延续则不会，注意配置项
 */
@Slf4j
@Service("exceptionTransaction")
public class TransactionService implements JavaDelegate {

    @Override
    public void execute(DelegateExecution execution) {
        throw new RuntimeException("抛出异常");
    }
}
